package com.le.tester.book.concurrentjavafight.l6_3_8;


import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

/**
 * createTime：2022/10/28 15:52
 * description：旅游线路查询d
 */
//public class QuoteTask implements Callback<TravelQuote> {
public class QuoteTask {
//    private static final ExecutorService exec = Executors.newCachedThreadPool();
//    private final TravelCompany company;
//    private final TravelInfo travelInfo;
//
//    public TravelQuote call() {
//        return company.solicitQueto(travelInfo);
//    }
//
//    public List<TravelQuote> getRankedTravelQuotes(TravelInfo travelInfo, Set<TravelCompany> companys,
//                                                   Comparator<TravelQueto> ranking, long time, TimeUnit unit) {
//
//        List<QuoteTask> tasks = new ArrayList<>();
//
//        for (TravelCompany company : companys) {
//            tasks.add(new QuetoTask(company, travelInfo));
//        }
//
//        List<Future<TravelQuote>> futures = exec.invokeAll(tasks, time, unit);
//    }
}
